Skip to main content

Manage profile

3 minute read                                                                                                                         Advanced


Glific introduces multiple profiles, enabling efficient and personalized engagement with beneficiaries where a single phone number is used by multiple end users. In this way, by segregating a single contact at the profile level, NGOs can significantly increase the impact of their work.


Sample Use Case

To achieve the multiple profiles feature, We added a new node called Manage profile with two choices at the flow level.

  1. Create Profile creates a new profile for contact.
  2. Switch Profile allows you to change between profiles.

Create Profile

  1. Here's a sample flow with minimal configuration for creating a profile in Glific

8

  1. The initial node is the Send Message node, where the contact is prompted to provide their details such as name, role, or age to create the profile

2

  1. The second node is the Wait for Response node with the result name demo_username. The response from the contact will be saved in this result and can be referenced as @results.demo_username.

3

  1. The third node is the Interactive Message, the user is presented with options to select their role, in the below sample case we have given the option to choose the role as student or teacher. 4

  2. Using the user information provided, the Manage profile node will create a user profile, and the relevant data will be saved in the result variables, accessible as @results.demo_username and @results.demo_role for future reference.

5

  1. Finally, the Update Contact node will update the contact with the relevant contact variables.

6

  1. Upon profile creation, a message will be sent using the Send Message node, notifying the contact that "your user profile has been successfully created!"

7


Switch Profile

  1. Here's a sample flow with minimal configuration for the switch Profile profile in Glific

A

  1. The first node is the Send Message facilitates users in switching between different profiles by using the @contact.list_profiles to display all available user profiles.

B

Here's how the contacts will look like:

photo

  1. The second node is the Wait for Response node where each profile will be numbered based on when they were created, first, second, third, and so on. The response from the contact will be saved in the result and can be referenced as @results.profile_index

c

  1. We'll use the Manage Profile node to switch the user profile based on their response, using the @results.profile_index.

photo

  1. Once the switch is completed successfully, a message will be sent to the contacts using the Send Message node, notifying them that their profile has been successfully switched to @contact.fields.demo_username.

e


Tags

Multiple profiles, create profile, switch profile, manage profile, update contact, Interactive Message